<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var m=prompt("请输入第一个数");
        var n=prompt("请输入第二个数");
        if(m>=n){
            for(var t=m;t<m**2;t++){
                if(t%m==0&&t%n==0){
                    document.write(m+"和"+n+"的最大公倍数为"+t);
                    break;
                }
            }
        }else{
            for(var t=n;t<n**2;t++){
                if(t%m==0&&t%n==0){
                    document.write(m+"和"+n+"的最大公倍数为"+t);
                    break;
                }
            } 
        }
    </script>
</body>
</html>